
#ifndef MSE_CAN_H
#define MSE_CAN_H

#include "can.h"
#include "string.h"
#include "MSE_MOTOR.h"
#include "MY_define.h"

union COMMUNICATION_UNION_Typdef // 使用共用体整合数据
{
    struct
    {
        //遥控数据
        int16_t VX;
        int16_t VY;
        int16_t VW;
		int8_t  VZ;
		int8_t  VR;
        uint8_t DBUS_STATUS;
    } DataNeaten;
    // 接收到的数组
    uint8_t  Data[9];
};
void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan);
void ctrl_motor(CAN_HandleTypeDef* _hcan, uint16_t id, float _pos, float _vel);
void MSE_F_CAN_SEDN(CAN_HandleTypeDef* _hcan , int16_t stdid , int16_t num1 , int16_t num2 , int16_t num3 , int16_t num4);
void MSE_F_CAN_SEDNSCD(CAN_HandleTypeDef* _hcan , int16_t stdid , int16_t num1 , int16_t num2 , int16_t num3 , int16_t num4);
void MSE_F_CAN_SEDN_UNION(CAN_HandleTypeDef* _hcan , int16_t stdid , uint8_t* Data);
void CAN_Filter_Init(void);
#endif
